package cn.jhc.model;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity(name="shopcar")
@Table(name="shopcar")
public class ShopCar {
	private int id;
	private String goodname;
	private String price;
	private String disount;
	private String quantity;
	private String total;
	private String img;
	private String goodbn;
	Set<Goods> goods = new HashSet<Goods>();
  @OneToMany(cascade=CascadeType.ALL)
  @JoinColumn(name="good_id")
	public Set<Goods> getGoods() {
		return goods;
	}
	public void setGoods(Set<Goods> goods) {
		this.goods = goods;
	}
	@Id
   @GeneratedValue
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getGoodname() {
		return goodname;
	}
	public void setGoodname(String goodname) {
		this.goodname = goodname;
	}
	public String getPrice() {
		return price;
	}
	public void setPrice(String price) {
		this.price = price;
	}
	public String getDisount() {
		return disount;
	}
	public void setDisount(String disount) {
		this.disount = disount;
	}
	public String getQuantity() {
		return quantity;
	}
	public void setQuantity(String quantity) {
		this.quantity = quantity;
	}
	public String getTotal() {
		return total;
	}
	public void setTotal(String total) {
		this.total = total;
	}
	public String getImg() {
		return img;
	}
	public void setImg(String img) {
		this.img = img;
	}
	public String getGoodbn() {
		return goodbn;
	}
	public void setGoodbn(String goodbn) {
		this.goodbn = goodbn;
	}
	
}
